package com.anolesoft.amljmes.foreknow.controller;

import com.anolesoft.amljmes.foreknow.bo.MesBzzPtjhmx;
import com.anolesoft.amljmes.foreknow.service.MesBzzPtjhmxService;
import com.anolesoft.common.core.constant.HttpStatus;
import com.anolesoft.common.core.web.domain.AjaxResult;
import com.anolesoft.yr.util.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mesbzzptjhmx")
public class MesBzzPtjhmxController {
    @Autowired
    private MesBzzPtjhmxService service;

    @RequestMapping(value = "/queryall" , method = RequestMethod.POST)
    public AjaxResult queryMesBzzPtjhmxInfo(@RequestBody String ierpobjuid){
        System.out.println(ierpobjuid);
        String id = ierpobjuid.substring(0,ierpobjuid.length()-1);
        List<MesBzzPtjhmx> allList = service.queryAll(id);
        return new AjaxResult(HttpStatus.SUCCESS, Constants.QUERY_SUCCESS_MESSAGE,allList);
    }
}
